<template>
	<view class="index-container">
		<!-- <image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view> -->
		<view>
			<text class="title">基本信息</text>
			<uni-list>
				<uni-list-item title="姓名" rightText="林泽坚" :show-arrow="false"></uni-list-item>
				<uni-list-item title="性别" rightText="男" :show-arrow="false"></uni-list-item>
				<uni-list-item title="学历" rightText="大学本科" :show-arrow="false"></uni-list-item>
				<uni-list-item title="毕业学校" rightText="广东工业大学" :show-arrow="false"></uni-list-item>
				<uni-list-item title="大学专业" rightText="信息与计算科学" :show-arrow="false"></uni-list-item>
				<uni-list-item title="居住地" rightText="广东省广州市车陂祠前大街" :show-arrow="false"></uni-list-item>
				<uni-list-item title="工作时间" rightText="2020.07-2021-05" :show-arrow="false"></uni-list-item>
			</uni-list>
		</view>
		<view>
			<text class="title">联系方式<text
					style="color: #C0C0C0;font-size: 24rpx;padding-left: 10rpx;">(点击复制)</text></text>
			<uni-list>
				<uni-list-item title="手机号码" rightText="15521035856" @click="phone" :show-arrow="false"></uni-list-item>
				<uni-list-item title="微信" rightText="15521035856" @click="weixin" :show-arrow="false"></uni-list-item>
				<uni-list-item title="QQ/邮箱" rightText="208781239@qq.com" @click="mail" :show-arrow="false">
				</uni-list-item>
			</uni-list>
		</view>
		<view v-if="isH5">
			<text class="title">小站地址</text>
			<uni-list>
				<view class="" style="cursor: pointer">
					<uni-list-item title="github" rightText="点击前往" @click="goGithub" :show-arrow="false">
					</uni-list-item>
					<uni-list-item title="gitee" rightText="点击前往" @click="goGitee" :show-arrow="false"></uni-list-item>
					<!-- <uni-list-item title="简书" rightText="点击前往" @click="gojianshu" :show-arrow="false"></uni-list-item> -->
					<!-- <uni-list-item title="知乎" rightText="点击前往" @click="gozhihu" :show-arrow="false"></uni-list-item> -->
					<uni-list-item title="个人博客" rightText="点击前往" @click="goboke" :show-arrow="false"></uni-list-item>
					<uni-list-item title="uni-app开发的记录与聊天室H5" rightText="点击查看" @click="goH5" :show-arrow="false">
					</uni-list-item>
					<uni-list-item title="app体验下载" rightText="点击下载" @click="goDownApp" :show-arrow="false">
					</uni-list-item>
					<uni-list-item title="博客园笔记" rightText="点击前往" @click="goCNBlogs" :show-arrow="false"></uni-list-item>
				</view>
				<view class="MP">
					<view class="left">
						小程序
					</view>
					<view class="right">
						<image src="../../static/mp-logo.jpg" mode=""></image>
					</view>
				</view>
			</uni-list>
		</view>
	</view>
</template>

<script>
	import uniList from "@/components/uni-list/uni-list.vue"
	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
	import uniCard from '@/components/uni-card/uni-card.vue'
	export default {
		components: {
			uniCard,
			uniListItem,
			uniList
		},
		data() {
			return {
				title: 'Hello',
				isH5: false
			}
		},
		onLoad() {
			// #ifdef H5
			this.isH5 = true
			uni.showToast({
				title: "pc端浏览器切换手机端刷新查看，效果更佳",
				duration: 2000,
				icon: "none"
			})
			// #endif
		},
		methods: {
			phone() {
				uni.setClipboardData({
					data: '15521035856',
					success: function(data) {
						uni.showToast({
							title: '复制成功',
							duration: 1000
						});
					},
					fail: function(err) {
						uni.showToast({
							title: '复制失败',
							duration: 1000
						});
					},
					complete: function(res) {

					}
				})
			},
			weixin() {
				uni.setClipboardData({
					data: '15521035856',
					success: function(data) {
						uni.showToast({
							title: '复制成功',
							duration: 1000
						});
					},
					fail: function(err) {
						uni.showToast({
							title: '复制失败',
							duration: 1000
						});
					},
					complete: function(res) {

					}
				})
			},
			mail() {
				uni.setClipboardData({
					data: '208781239@qq.com',
					success: function(data) {
						uni.showToast({
							title: '复制成功',
							duration: 1000
						});
					},
					fail: function(err) {
						uni.showToast({
							title: '复制失败',
							duration: 1000
						});
					},
					complete: function(res) {

					}
				})
			},

			goGithub() {
				window.location.href = 'https://github.com/yoona-lin'
			},
			goGitee() {
				window.location.href = 'https://gitee.com/yoonaLin'
			},
			gojianshu() {
				window.location.href = './'
			},
			gozhihu() {
				window.location.href = './'
			},
			goboke() {
				window.location.href = 'https://yoona-lin.github.io/'
			},
			goH5() {
				window.location.href = 'https://static-e4277e38-5b28-4202-93ec-eaea9f6a3ced.bspapp.com/'
			},
			goDownApp() {
				window.location.href =
					'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-f142485f-3c6b-4bb9-9f07-154c46e21111/96cec907-b8ed-4014-b8ea-1eb0c8fe312b.apk'
			},
			goCNBlogs() {
				window.location.href = 'https://www.cnblogs.com/yoona-lin/'
			}
		}
	}
</script>

<style>
	.index-container {
		padding-bottom: 50rpx;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		margin: 20rpx;
		font-size: 34rpx;
		color: #b8b8be;
		font-weight: bold;
		line-height: 80rpx;
	}

	.MP {
		padding: 20rpx 20rpx 20rpx 0;
		margin-left: 30rpx;
		display: flex;
		justify-content: space-between;
		border-top: 2rpx solid #c8c7cc;
		/* padding: 10rpx 0; */
	}

	.MP .left {
		color: #677176;
		font-size: 28rpx;
		font-weight: 600;
	}

	.MP .right {
		width: 140rpx;
		height: 140rpx;
	}

	.MP .right image {
		width: 100%;
		height: 100%;
	}
</style>
